package com.syl.service.impl;

import com.syl.entity.Emp;
import com.syl.mapper.EmpMapper;
import com.syl.service.EmpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.Map;

/**
 * @Classname EmpServiceImpl
 * @Description
 * @Date 2025/8/8 19:49
 * @Created by SYL
 */


@Service
public class EmpServiceImpl implements EmpService {
    @Autowired
    private EmpMapper empMapper;
    @Override
    public Emp findById(int id) {
        Emp emp= empMapper.findById( id);
        return emp;
    }

    @Override
    public int addEmp(Emp emp) {
        return empMapper.addEmp(emp);
    }

    @Override
    public Emp checkEmp(Map<String, String> emp) {
        return empMapper.checkEmp(emp);
    }

    @Override
    public int updateEmp(Emp emp) {
        return empMapper.updateEmp(emp);
    }

    @Override
    public ArrayList<Emp> allEmp() {
        return empMapper.allEmp();
    }

    @Override
    public int delectEmp(int id) {
        return empMapper.delectEmp(id);
    }


}
